package top.kaoshanji.r2ch07f;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 代码清单-r2ch07f-258页a：测试一下复合切点切面
 * @author kaoshanji
 * ^_^
 * create time 2025/5/7 19:54
 */
public class GreetingComposableAdvisorContext {

    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("r2ch07f/greeting-composable-advisor-beans.xml");

        Waiter waiter = (Waiter)context.getBean("waiter");

        WaiterDelegate wd = new WaiterDelegate();
        wd.setWaiter(waiter);

        waiter.serveTo("Peter1");
        waiter.greetTo("Peter1");

        wd.service("Perter2");

    }

}
